FROM alpine

RUN apk add --no-cache gcc musl-dev gcompat

RUN apk add tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone

RUN ln -s /usr/lib/libc.so /usr/lib/libresolv.so.2

COPY rpc-server /
COPY build/data/rpc-server/rpc-server/output/conf/rpc-server.yaml /

ENTRYPOINT ["/rpc-server","-c","/rpc-server.yaml"]